package com.xbk.seckill.common.model.message;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 事务消息
 *
 * @author xiexu
 * @date 2025/2/26 08:49
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class TxMessage extends ErrorMessage {

    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 商品版本号
     */
    private Long version;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 秒杀活动价格
     */
    private BigDecimal activityPrice;

    public TxMessage(String destination,
                     Long txNo,
                     Long goodsId,
                     Integer quantity,
                     Long activityId,
                     Long version,
                     Long userId,
                     String goodsName,
                     BigDecimal activityPrice,
                     String placeOrderType,
                     Boolean exception,
                     Integer bucketSerialNo,
                     String orderTaskId) {
        super(destination, txNo, goodsId, quantity, placeOrderType, exception, bucketSerialNo, userId, orderTaskId);
        this.activityId = activityId;
        this.version = version;
        this.goodsName = goodsName;
        this.activityPrice = activityPrice;
    }

}
